﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using BOSS.Domain.Products;

namespace BOSS.Service.Products
{
    /// <summary>
    /// 产品服务
    /// </summary>
    public interface IProductService : IEntityService<Product, int>
    {
        /// <summary>
        /// 购买产品
        /// </summary>
        /// <param name="purchaseRecord"></param>
        /// <returns></returns>
        int Purchase(PurchaseRecord purchaseRecord);

        /// <summary>
        /// 消耗产品
        /// </summary>
        /// <param name="consumptionRecord"></param>
        /// <returns></returns>
        int Consume(ConsumptionRecord consumptionRecord);

        /// <summary>
        /// 获取产品购买记录
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        PurchaseRecord FindPurchaseRecordById(int id);

        /// <summary>
        /// 获取产品消耗记录
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        ConsumptionRecord FindConsumptionRecordById(int id);
    }
}
